home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
LDB171.ARJ
/
EXAMP503.CPP
< prev
next >
Wrap
Text File
|
1992-05-12
|
582b
|
24 lines
// examp503.cpp - link with strbdr.obj and binder.obj
// rework of examp502.cpp
#define sfile "examp503.txt"
#include <string.h>
#include "strbdr.hpp"
main()
{
StrBdr sb(BDR_DDELETE | BDR_DNEW | BDR_DSTORE);
sb.ins(strdup("line one"));
sb.insNew("line two");
sb.save(sfile);
StrBdR sB = new StrBdr(sfile);
if (!sB) return 1;
sB->setCurNode(); // reset current node
while (sB->next()) cout << (char *)*sB << "\n";
delete sB;
return 0;
}